<?php
declare (strict_types=1);

namespace ffhome\common\ch02;

class UseProducts
{
    public function doSomething()
    {
        $appleSauce = new FruitStore();
        $orangeJuice = new CitrusStore();
        return $this->doInterface($appleSauce)
            . $this->doInterface($orangeJuice);
    }

    function doInterface(IProduct $product)
    {
        return $product->apples() . $product->oranges();
    }
}